Optimal. Leaf size=82 \[ -\frac {3 \tanh ^{-1}(\sin (c+d x))}{8 a d}+\frac {3 \sec (c+d x) \tan (c+d x)}{8 a d}-\frac {\sec (c+d x) \tan ^3(c+d x)}{4 a d}+\frac {\tan ^4(c+d x)}{4 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2785, 2687, 30,
2691, 3855} \begin {gather*} \frac {\tan ^4(c+d x)}{4 a d}-\frac {3 \tanh ^{-1}(\sin (c+d x))}{8 a d}-\frac {\tan ^3(c+d x) \sec (c+d x)}{4 a d}+\frac {3 \tan (c+d x) \sec (c+d x)}{8 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2687
Rule 2691
Rule 2785
Rule 3855
Rubi steps
\begin {align*} \int \frac {\tan ^3(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\int \sec ^2(c+d x) \tan ^3(c+d x) \, dx}{a}-\frac {\int \sec (c+d x) \tan ^4(c+d x) \, dx}{a}\\ &=-\frac {\sec (c+d x) \tan ^3(c+d x)}{4 a d}+\frac {3 \int \sec (c+d x) \tan ^2(c+d x) \, dx}{4 a}+\frac {\text {Subst}\left (\int x^3 \, dx,x,\tan (c+d x)\right )}{a d}\\ &=\frac {3 \sec (c+d x) \tan (c+d x)}{8 a d}-\frac {\sec (c+d x) \tan ^3(c+d x)}{4 a d}+\frac {\tan ^4(c+d x)}{4 a d}-\frac {3 \int \sec (c+d x) \, dx}{8 a}\\ &=-\frac {3 \tanh ^{-1}(\sin (c+d x))}{8 a d}+\frac {3 \sec (c+d x) \tan (c+d x)}{8 a d}-\frac {\sec (c+d x) \tan ^3(c+d x)}{4 a d}+\frac {\tan ^4(c+d x)}{4 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 54, normalized size = 0.66 \begin {gather*} -\frac {3 \tanh ^{-1}(\sin (c+d x))+\frac {1}{-1+\sin (c+d x)}-\frac {1}{(1+\sin (c+d x))^2}+\frac {4}{1+\sin (c+d x)}}{8 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 67, normalized size = 0.82
method | result | size |
derivativedivides | \(\frac {\frac {1}{8 \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {1}{2 \left (1+\sin \left (d x +c \right )\right )}-\frac {3 \ln \left (1+\sin \left (d x +c \right )\right )}{16}-\frac {1}{8 \left (\sin \left (d x +c \right )-1\right )}+\frac {3 \ln \left (\sin \left (d x +c \right )-1\right )}{16}}{d a}\) | \(67\) |
default | \(\frac {\frac {1}{8 \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {1}{2 \left (1+\sin \left (d x +c \right )\right )}-\frac {3 \ln \left (1+\sin \left (d x +c \right )\right )}{16}-\frac {1}{8 \left (\sin \left (d x +c \right )-1\right )}+\frac {3 \ln \left (\sin \left (d x +c \right )-1\right )}{16}}{d a}\) | \(67\) |
risch | \(-\frac {i \left (2 i {\mathrm e}^{4 i \left (d x +c \right )}-2 \,{\mathrm e}^{3 i \left (d x +c \right )}-2 i {\mathrm e}^{2 i \left (d x +c \right )}+5 \,{\mathrm e}^{5 i \left (d x +c \right )}+5 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4 \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{4} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{2} d a}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 a d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 a d}\) | \(139\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 89, normalized size = 1.09 \begin {gather*} -\frac {\frac {2 \, {\left (5 \, \sin \left (d x + c\right )^{2} + \sin \left (d x + c\right ) - 2\right )}}{a \sin \left (d x + c\right )^{3} + a \sin \left (d x + c\right )^{2} - a \sin \left (d x + c\right ) - a} + \frac {3 \, \log \left (\sin \left (d x + c\right ) + 1\right )}{a} - \frac {3 \, \log \left (\sin \left (d x + c\right ) - 1\right )}{a}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 125, normalized size = 1.52 \begin {gather*} -\frac {10 \, \cos \left (d x + c\right )^{2} + 3 \, {\left (\cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (\cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, \sin \left (d x + c\right ) - 6}{16 \, {\left (a d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + a d \cos \left (d x + c\right )^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\tan ^{3}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.72, size = 96, normalized size = 1.17 \begin {gather*} -\frac {\frac {6 \, \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a} - \frac {6 \, \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a} + \frac {2 \, {\left (3 \, \sin \left (d x + c\right ) - 1\right )}}{a {\left (\sin \left (d x + c\right ) - 1\right )}} - \frac {9 \, \sin \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) - 3}{a {\left (\sin \left (d x + c\right ) + 1\right )}^{2}}}{32 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.11, size = 172, normalized size = 2.10 \begin {gather*} \frac {\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}+\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}-\frac {3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,a\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________